package com.mall.service.impl;

import com.mall.common.pojo.TaotaoResult;
import com.mall.mapper.TbContentMapper;
import com.mall.pojo.TbContent;
import com.mall.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ContentServiceImpl implements ContentService{


    @Autowired
    private TbContentMapper tbContentMapper;

    @Override
    public TaotaoResult insertContent(TbContent content) {

        content.setCreated(new Date());
        content.setUpdated(new Date());
        tbContentMapper.insert(content);

        return TaotaoResult.ok();
    }
}
